package com.hj.system.common.service.impl;

import com.hj.system.base.utils.PageUtils;
import com.hj.system.common.dao.LogDao;
import com.hj.system.common.domain.SystemLogEntity;
import com.hj.system.common.service.LogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;

import java.util.Map;

@Service
public class LogServiceImpl implements LogService {
    @Autowired
    private LogDao logMapper;

    @Async
    @Override
    public void save(SystemLogEntity systemLogEntity) {
        logMapper.save(systemLogEntity);
    }

    @Override
    public PageUtils list(Map<String, Object> params) {
        return PageUtils.getPageUtils(logMapper, params);
    }

    @Override
    public int remove(String id) {
        int count = logMapper.remove(id);
        return count;
    }

    @Override
    public int batchRemove(String[] ids) {
        return logMapper.batchRemove(ids);
    }
}
